﻿@page
@model Remotely.Server.Pages.InviteModel
@{
    ViewData["Title"] = "Invite";
}
<h3>Organization Invite</h3>
<hr />
<div class="row">
    <div class="col-sm-12">
        @if (Model.Success)
        {
            <h5>Congratulations!</h5>
            <p class="text-info">
                You've successfully joined the organization!
            </p>
        }

        else
        {
            <form method="post">
                <div>
                    <strong class="text-danger">WARNING: </strong>
                    <p class="text-danger">You will leave your current organization and lose access to its agents unless someone is able to invite you back in.</p>
                    <p>Are you sure you want to leave your current organization and join this one?</p>
                </div>
                <div asp-validation-summary="All" class="text-danger"></div>
                <input asp-for="Input.InviteID" hidden />
                <div class="form-group">
                    <button type="button" class="btn btn-secondary mr-3" onclick="location.assign(location.origin)">Cancel</button>
                    <button type="submit" class="btn btn-danger">Confirm</button>
                </div>
            </form>
        }

    </div>
</div>
